﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Zj.OpenAuth.Domain.Core
{
    /// <summary>
    /// entity department
    /// </summary>
    public class Department:BaseEntity
    {

        public Department()
        {
            this.ParentId = null;
            this.Text = string.Empty;
            this.Code = string.Empty;
            this.Description = $"创建于{DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss")}";
            this.Status = StatusEnum.Normal;
            this.CreatorId = 1;
            this.CreateTime = DateTime.Now;
            this.LastModifierId = null;
            this.LastModifyTime = null;
            this.ManagerId = null;
            this.Phone = "188XXXX5563";
            this.Code = this.Text;
        }
        


        public string Text { get; set; }



        public string Code { get; set; }



        public string Description { get; set; }




        [DataType(DataType.PhoneNumber)]
        public string Phone { get; set; }



        public StatusEnum Status { get; set; }



        public int? ManagerId { get; set; }



        public int? CreatorId { get; set; }



        [DataType(DataType.DateTime)]
        public DateTime CreateTime { get; set; }



        public int? LastModifierId { get; set; }



        [DataType(DataType.DateTime)]
        public DateTime? LastModifyTime { get; set; }



        public int? ParentId { get; set; }
    }
}
